package com.doitedu.day01

import java.util.Random

/**
 * @Date 22.6.19
 * @Created by HANGGE
 * @Description
 */
object _02IFDemo02 {
  def main(args: Array[String]): Unit = {
    // 定义一个数组
    val arr =  Array[String]("yubo" ,"shuqi" ,"sumin" , "renzhuo" , "zheqi" , "lilei")

    val random = new Random()
    val i = random.nextInt(arr.length)
    val name = arr(2)
    println(s"=============$name==================")
    if (name.startsWith("s")){
      println("名字以S开头")
      if (name.equals("shuqi")){
        println("shuqi")
      }else{
        println("sumin")
      }
    }else{
      println("名字不以S开头")
    }







  }

}
